<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"import="pojo.*,service.*,base.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title></title>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    

  </head>
  
  <body>
<%
	String username = request.getParameter("admin").trim();

    String password = request.getParameter("pwd").trim();

    ManagerService service =new ManagerService();

    manager_infor manager = service.managerLogin(username, password);


if(manager!=null){
	out.print("登录成功！");
	session.setAttribute("name",manager.getUsername());
	session.setAttribute("id",manager.getId());
	response.sendRedirect("../index.jsp");
}

else
	out.print("登录失败！请重新登录<a href='../login.jsp'>返回</a>");


	%>


</body>
 
</html>
